<?php
require_once($_SERVER["DOCUMENT_ROOT"].'/vendor/autoload.php');
require_once($_SERVER["DOCUMENT_ROOT"]."/myzhuaqu.php");
use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Remote\WebDriverExpectedCondition;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\WebDriverBy;
use Facebook\WebDriver\WebDriverWait;
$options = new ChromeOptions();
//$options->addArguments(['--headless']);  //不出现浏览器
$options->addArguments(['--disable-blink-features=AutomationControlled']);
$options->addArguments(['--disable-extensions']);
$options->addArguments(['--disable-gpu']);
$options->addArguments(['--disable-infobars']);
$options->addArguments(['--disable-notifications']);
$options->addArguments(['--disable-popup-blocking']);
$options->addArguments(['--disable-web-security']);
$options->addArguments(['--ignore-certificate-errors']);
$options->addArguments(['--no-sandbox']);
$options->addArguments(array('--bookmarks=1'));

$options->setExperimentalOption("useAutomationExtension", false);
$options->setExperimentalOption("excludeSwitches", ['enable-automation']);
$options->addArguments(['--user-data-dir=/d/temp']);
//exec("taskkill /IM chrome.exe /F");
